home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 51
/
051.d81
/
toy store
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
15KB
|
544 lines
10 ifa=0 then poke648,4:gosub53030
100 ifa=0thena=1:load"sprites",8,1
110 ifa=1thena=2:load"chars",8,1
120 print" press any key when ready to continue"
130 geta$:ifa$=""then130
500 qo$="[151]@abcd[157][157][157][157][157]efghi[157][157][157][157][157]jklmn[157][157][157][157][157]opqrs"
501 q1$="[151]tuvwx[157][157][157][157][157]yz[\][157][157][157][157][157]^_!"+chr$(34):q2$="#[157][157][157][157][157]$%&'("
502 no$="[151])*+,[157][157][157][157]-./0[157][157][157][157]1234"
503 nr$="[151]5678[157][157][157][157]9:;<[157][157][157][157]=>[192][193]"
504 po$="[149][194][195][196][197][157][157][157][157][198][199][200][201][157][157][157][157][202][203][204][205]"
505 pr$="[149][206][207][208][209][157][157][157][157][210][211][212][213][157][157][157][157][214][215][216][217]"
506 do$="[151][218][219][220][221][157][157][157][157][255][160][161][162][157][157][157][157][163][164][165][166]"
507 dr$="[151][170][171][172][173][157][157][157][157][174][175][176][177][157][157][157][157][178][179][165][181]"
508 poke648,200:print"[147] please wait...":poke648,4
1005 sm=51200:v=53248:print"[147]":poke53280,9:poke53281,15
1006 poke53272,(peek(53272)and240)or0
1007 poke56578,peek(56578)or3
1008 poke56576,(peek(56576)and252)or0
1009 poke53272,(peek(53272)and15)or32
1011 print"[147] the screen has been moved."
1012 print" to get things back to normal you"
1013 print" need to type poke648,4 and press"
1014 print" return. you will not see a cursor"
1015 print" or what you are typing.":poke648,200
1020 gosub 51000 : rem sprite initialize
1025 gosub53000:rem sound
1043 rem gosub41300:rem song
1050 gosub12000:rem select skill
1060 gosub13000:ifbg=1then1050:rem select level
1065 forpb=1to10:tr=-1
1070 gosub14000:rem select coin set
1080 onskgosub15000,20000,25000:rem skill sections
1083 iftrthengosub35000:rem re-inforce correct problem
1084 next
1085 gosub36000:rem report scores
1090 ifin$="p"thensc=0:goto1050
1095 gosub62000:goto1085
10000 :
10001 rem ***program flow subroutines***
11000 :
11001 rem title page
12000 :
12001 rem select skill
12005 gosub41000:rem build store
12010 pr$(0)="what skill shall we":pr$(1)="practice?"
12015 pr$(2)="press 1, 2, 3 or q."
12020 gosub44000:rem print prompt
12025 print"[144]1. name and tell value of one coin.
12030 [153]"2. tell value of a group of coins"
12035 [153]"that are all the same kind."
12040 [153]"3. tell the value of a mixed group"
12045 [153]"of coins."
12046 [153]"q. quit to loadstar."
12060 [153]"1 is easiest - 3 is hardest "
12100 [151]198,0
12103 [161]in$:[139]in$[178]""[167]12103
12104 [139] in$[178]"q" [167] [141] 62000:[137] 12025
12105 [139]in$[179]"1"[176]in$[177]"3"[167][141]49050:[137]12100:[143] wrong sound
12110 sk[178][197](in$)
12115 [141]49000:[143] right sound
12999 [142]
13000 bg[178]0
13001 [143] select level
13005 [141]41000:[143] build store
13010 pr$(0)[178]"what coins shall we":pr$(1)[178]"work with?"
13015 pr$(2)[178]"press 1, 2, 3 or q."
13020 [141]44000:[143] print prompt
13025 [153]"1. nickels and pennies"
13030 [153]"2. dimes, nickels and pennies"
13035 [153]"3. quarters, dimes, nickels and"
13040 [153]"pennies"
13041 [153]"q. quit to previous menu."
13100 [151]198,0
13103 [161]in$:[139]in$[178]""[167]13103
13104 [139] in$[178]"q" [167] bg[178]1:[142]
13105 [139]in$[179]"1"[176]in$[177]"3"[167][141]49050:[137]13100:[143] wrong sound
13110 lv[178][197](in$)
13115 [141]49000:[143] right sound
13999 [142]
14000 :
14001 [143] choose coin set
14005 [129]c2[178]0[164]3:cn(c2)[178]0:[130]
14010 [145]sk[141]14100,14200,14300
14015 ct[178]cn(0)[170]cn(1)[170]cn(2)[170]cn(3)
14020 [139]ct[178]0[176]ct[177]14[167]14000
14025 [129]d2[178]0[164]3:cs(d2)[178]cn(d2):[130]:ts[178]ct
14030 [142]
14100 :
14101 [143] skill 1 coin
14105 cn([181]([187](1)[172](lv[170]1)))[178]1
14110 [142]
14200 :
14201 [143] skill 2 coins
14205 cn([181]([187](1)[172](lv[170]1)))[178][181]([187](1)[172]3)[170]2
14210 [142]
14300 :
14301 [143] skill 3 & 4 coins
14305 [129]c3[178]0[164]lv
14310 cn(c3)[178][181]([187](1)[172]5)
14315 [130]
14325 [142]
14700 :
14701 [143] wait screen
14705 [151]53280,3:[151]53281,3:[153][199](142)
15000 :
15001 [143] skill:name and give value of single coin
15020 [141]41000:[143] build store
15030 [141]45000:[143] place coin subset
15050 [141]15500:[143] ask name of coin
15080 [139][168]rw[167]tr[178]0:[141]16000:[137]15020:[143] wrong
15085 [141]49000:[143] right sound
15090 [141]16500:[143] ask value of coin
15105 [141]48500:[143] check value
15110 [139][168]rw[167]tr[178]0:[141]17000:[137]15020:[143] wrong
15115 [141]49000:[143] right sound
15249 [142]
15500 :
15501 [143] ask name of coin
15505 pr$(0)[178]"what do we call this":pr$(1)[178]"coin? (return quits)":pr$(2)[178]""
15510 [141]44000:[143] print prompts
15515 [153]"on";
15520 [141]46000:[139]an$[178]""[167] [141] 63000
15525 [145]c5[170]1[141]15550,15600,15650,15700
15530 [142]
15550 :
15551 [143] penny or cent
15555 se$[178]"pen":[141]47000:[139]rw[167]15599
15560 se$[178]"cent":[141]47000:[139]rw[167]15599
15565 se$[178]"sent":[141]47000
15599 [142]
15600 :
15601 [143] nickel
15605 se$[178]"nic":[141]47000:[139]rw[167]15649
15610 se$[178]"nik":[141]47000
15649 [142]
15650 :
15651 [143] dime
15655 se$[178]"dim":[141]47000:[142]
15700 :
15701 [143] quarter
15705 se$[178]"q":[141]47000:[139]rw[178][171]1[167]15720
15710 se$[178]"kw":[141]47000:[139]rw[178][171]1[167]15720
15715 se$[178]"cw":[141]47000
15720 [139][168]rw[167]15730
15725 se$[178]"ter":[141]47000
15730 [142]
16000 :
16001 [143] if name incorrect
16003 [141]49050:[143] wrong sound
16005 [141]41000:[143] build shop
16010 sp[178]692:[145]c5[170]1[141]42500,42300,42700,42100
16015 sp[178]699:[145]c5[170]1[141]42600,42400,42800,42200
16020 pr$(0)[178]"no, this is called":pr$(2)[178]"press key to try again."
16025 [139]c5[178]0[167]pr$(1)[178]"a penny or cent."
16030 [139]c5[178]1[167]pr$(1)[178]"a nickel."
16035 [139]c5[178]2[167]pr$(1)[178]"a dime."
16040 [139]c5[178]3[167]pr$(1)[178]"a quarter."
16045 [141]44000:[143] print prompts
16050 [161]in$:[139]in$[178]""[167]16050
16055 [142]
16500 :
16501 [143] ask value of coin
16505 pr$(0)[178]"that's right!":pr$(1)[178]"now tell me what it's":pr$(2)[178]"worth."
16510 [141]44000:[143] print prompts
16515 [141]48000:[143] input value
16525 [142]
17000 :
17001 [143] if value incorrect
17003 [141]49050:[143] wrong sound
17005 [141]41000:[143] build shop
17010 sp[178]692:[145]c5[170]1[141]42500,42300,42700,42100
17015 sp[178]699:[145]c5[170]1[141]42600,42400,42800,42200
17020 [139]c5[178]0[167]pr$(0)[178]"no, a penny or cent is":pr$(1)[178]"worth one cent."
17025 [139]c5[178]0[167]pr$(2)[178]"1^ $.01 $0.01"
17030 [139]c5[178]1[167]pr$(0)[178]"no, a nickel is":pr$(1)[178]"worth five cents."
17035 [139]c5[178]1[167]pr$(2)[178]"5^ $.05 $0.05"
17040 [139]c5[178]2[167]pr$(0)[178]"no, a dime is":pr$(1)[178]"worth ten cents."
17045 [139]c5[178]2[167]pr$(2)[178]"10^ $.10 $0.10"
17050 [139]c5[178]3[167]pr$(0)[178]"no, a quarter is worth":pr$(1)[178]"twenty-five cents."
17055 [139]c5[178]3[167]pr$(2)[178]"25^ $.25 $0.25"
17060 [141]44000:[143] print prompts
17065 [161]in$:[139]in$[178]""[167]17065
17070 [142]
20000 :
20001 [143] skill: give value of set of like coins
20020 [141]41000:[143] build store
20030 [141]45000:[143] place coin subset
20040 [141]21500:[143] ask value
20050 [141]48500:[143] check value
20060 [139][168]rw[167]tr[178]0:[141]49050:[141]22000:[137]20000:[143] wrong
20065 [141]49000:[143] right sound
20249 [142]
21500 :
21501 [143] ask for value
21505 pr$(0)[178]"what are these coins":pr$(1)[178]"worth all together?":pr$(2)[178]""
21507 [139]ts[178]1[167]pr$(0)[178]"what is this":pr$(1)[178]"coin worth?"
21510 [141]44000:[143] print prompts
21515 [141]48000:[143] input value
21525 [142]
22000 :
22001 [143] if value incorrect
22005 pr$(0)[178]"no.":pr$(1)[178]"press a key and we'll":pr$(2)[178]"try something easier."
22010 [141]44000:[143] print prompt
22015 [161]in$:[139]in$[178]""[167]22015
22020 [129]d1[178]0[164]